package shared.pojo

import shared.pojo.Pojo.{MemberAddData, ValidData}
import upickle.default._

/**
 * Created by yz on 13/7/2022
 */
object CompanyMember {

  case class CompanyMemberData(id: Int = 0, account: String = "", password: String = "", companyName: String = "",
                               agree: Boolean = false)

  object CompanyMemberData {

    implicit val rw = macroRW[CompanyMemberData]

  }

  object Add {

    case class Request(account: String, password: String, companyName: String)

    object Request {

      implicit val rw = macroRW[Request]

    }

    type Response = ValidData

  }

  object Update {

    type Request = CompanyMemberData

    type Response = ValidData

  }

}
